<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>武汉市软件行业协会</title>
    <link rel="stylesheet" href="__PUBLIC__/Home/css/base.css">
    <link rel="stylesheet" href="__PUBLIC__/Home/css/head.css">
    <link rel="stylesheet" href="__PUBLIC__/Home/css/foot.css">
    <link rel="stylesheet" href="__PUBLIC__/Home/css/common_sub_nav.css">
    <link rel="stylesheet" href="__PUBLIC__/Home/css/contactUs.css">
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=pGAUp8mjKepcfIQvwDg2wIlL8GwKA1ol">
    </script>
</head>
<body>
<div class="container">
    {:W("Public/top")}
    <!-- head end -->
    <div class="content clearfix">
        <div class="subNav">
            {:W("Public/server")}
        </div>
        <div class="content_text">
          <div class="content_text_tit">
	    <h3><span></span><span></span>{$category.catname}</h3>
            <div class="position_nav">
              <p><span></span>当前位置：<a href="{:U('Index/index')}">首页 >></a> <a href="{:U('Contact/lxfs')}">联系我们">></a> <a href="{$category.url}">{$category.catname}</a></p>
            </div>
            </div>
            <div style="width:930px;height:444px;font-size:12px" id="map"></div>
            {$category.content}
	</div>
    </div>
    <!-- content end -->
    {:W("Public/footer")}
</div>
<script src="__PUBLIC__/Home/js/jquery.js"></script>
<script src="__PUBLIC__/Home/js/jquery.SuperSlide.2.1.1.js"></script>
<script src="__PUBLIC__/Home/js/common_head.js"></script>
<script>
    function initMap(){
        createMap();//创建地图
        setMapEvent();//设置地图事件
        addMapControl();//向地图添加控件
        addMapOverlay();//向地图添加覆盖物
    }
    function createMap(){
        map = new BMap.Map("map");
        map.centerAndZoom(new BMap.Point(114.307379,30.590598),19);

        var mapStyle = {
            features: ["road", "building", "water", "land"],//隐藏地图上的poi
            style: ""  //设置地图风格
        }
        map.setMapStyle(mapStyle);

    }
    function setMapEvent(){
        map.enableScrollWheelZoom();
        map.enableKeyboard();
        map.enableDragging();
        map.enableDoubleClickZoom()
    }
    function addClickHandler(target,window){
        target.addEventListener("click",function(){
            target.openInfoWindow(window);
        });
    }
    function addMapOverlay(){
        var markers = [
            {content:"湖北省武汉市汉口兰陵路1号  武汉市信息产业办公室315室",title:"武汉市软件行业协会",imageOffset: {width:-46,height:-21},position:{lat:30.590598,lng:114.307379}}
        ];
        for(var index = 0; index < markers.length; index++ ){
            var point = new BMap.Point(markers[index].position.lng,markers[index].position.lat);
            var marker = new BMap.Marker(point,{icon:new BMap.Icon("http://api.map.baidu.com/lbsapi/createmap/images/icon.png",new BMap.Size(20,25),{
                imageOffset: new BMap.Size(markers[index].imageOffset.width,markers[index].imageOffset.height)
            })});
            var label = new BMap.Label(markers[index].title,{offset: new BMap.Size(25,5)});
            var opts = {
                width: 200,
                title: markers[index].title,
                enableMessage: false
            };
            var infoWindow = new BMap.InfoWindow(markers[index].content,opts);
            marker.setLabel(label);
            addClickHandler(marker,infoWindow);
            map.addOverlay(marker);
            marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
        };
    }
    //向地图添加控件
    function addMapControl(){
        var scaleControl = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT});
        scaleControl.setUnit(BMAP_UNIT_IMPERIAL);
        map.addControl(scaleControl);
        var navControl = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE});
        map.addControl(navControl);
        var overviewControl = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:false});
        map.addControl(overviewControl);
    }
    var map;
    initMap();
</script>
<script>
    $(function(){
        $('.nav ul li dl').css({'display':'none'});
        $('.nav ul li dl').eq(9).css({'display':'block'});
    })
    </script>
</body>
</html>
